<link rel="stylesheet" href="./css/float.css">
<div id="float">

    <div class="box">
        <div class="items">
            <span class="icon iconfont icon-kefu"></span>
            <span>在线客服</span>
        </div>


        <div class="items">
            <span class="icon iconfont icon-dianhua"></span>
            <span>客服热线</span>
            <div class="kf">
                <p>400-1666-888</p>
                <p>24小时全国热线</p>
            </div>
        </div>


        <div class="items">
            <span class="icon iconfont icon-dibudaohanglan-"></span>
            <span>下载APP</span>

            <div class="erweima">
                <div class="item">
                    <img src="./img/erweima.webp">
                    <p>扫码下载OPPO商城App</p>
                </div>
            </div>

        </div>


        <div class="items">
            <span class="icon iconfont icon-xiaolian"></span>
            <span>浏览评价</span>
        </div>
    </div>

    <div class="items last-it">
        <span class="icon iconfont icon-icon3"></span>
        <span>返回顶部</span>
    </div>

</div>

<script>

    $(window).scroll(function () {
        if ($(window).scrollTop() > 250) {
            $("#float .last-it").css({
                opacity: 1
            });
        } else {
            $("#float .last-it").css({
                opacity: 0
            });
        }
    });
    $(".last-it").click(function () {
        $(document).scrollTop(0);
    })

    $("#float .items").eq(1).mouseover(function () {

        $(this).find(".kf").stop().fadeIn().mouseover(function () {
            $(this).css({
                display: "block"
            })
        }).mouseout(function () {
            $(this).stop().fadeOut()
        })

    }).mouseout(function () {
        $(this).find(".kf").stop().fadeOut()
    });


    $("#float .items").eq(2).mouseover(function () {

        $(this).find(".erweima").stop().fadeIn().mouseover(function () {
            $(this).css({
                display: "block"
            })
        }).mouseout(function () {
            $(this).stop().fadeOut()
        })

    }).mouseout(function () {
        $(this).find(".erweima").stop().fadeOut()
    })

</script>